package com.liu.excel;

import java.io.File;

import jxl.Cell;
import jxl.Sheet;
import jxl.Workbook;

/**
 * 读一个excel文件
 * @author My
 *
 */
public class ReadXLS {
	public static void main(String[] args) throws Exception {
		
		//读取excel
		Workbook workbook = Workbook.getWorkbook(new File("测试.xls"));
		//获得一个工作表对象
		Sheet sheet = workbook.getSheet(0);
		//得到第一行第一列的单元格
		Cell cell=sheet.getCell(0,0);
		String result=cell.getContents();
		System.out.println(result);
		workbook.close();
	}

}
